package com.yf.dxs.wo.req.msg;

import com.yf.dxs.wo.entity.WoCardMsgDO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 会员开卡消息
 * https://doc.weimobcloud.com/detail?menuId=19&childMenuId=1&tag=2483&id=2994&isold=2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WoCardMsg {

    private String bosId;
    private String cardNo;
    private Long createTime;
    private String customCardNo;
    private Integer membershipCardChannel;
    private Integer membershipCardScene;
    private Integer membershipCardSceneId;
    private Long membershipPlanId;
    private Long obtainTime;
    private Integer productId;
    private Long productInstanceId;
    private String saasChannel;
    private String saasClientId;
    private String tcode;
    private String traceCard;
    private Integer type;
    private Long vid;
    private Integer vidType;
    private Long wid;

    public WoCardMsgDO toEntity(){
        WoCardMsgDO woCard = new WoCardMsgDO();
        woCard.setCardNo(cardNo);
        woCard.setCustomCardNo(customCardNo);
        woCard.setWid(wid);
        woCard.setObtainTime(new Date(obtainTime));
        woCard.setCreateTime(new Date());
        return woCard;
    }
    
}
